package dao;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import dto.MemberDTO;

public class MemberDAO {
	private SqlMapClientTemplate sqlMap;

	public MemberDAO(SqlMapClientTemplate sqlMap) {
		this.sqlMap = sqlMap;
	}
	// 회원 삽입
	public void insertMember(MemberDTO mdto) {
		sqlMap.insert("insertMember",mdto);
	}
	// Id로 회원 조회
	public MemberDTO selectMemberById(String member_id){
		return (MemberDTO)sqlMap.queryForObject("selectMemberById",member_id);
	}
	// 회원 수정
	public void updateMember(MemberDTO new_mdto) {
		System.out.println("dao ----- "+new_mdto);
		sqlMap.update("updateMember", new_mdto);
		
	}
	
}
